<% content_for :page_head do %>
  <h1>开发人员详情</h1>
<% end %>

<table cellspacing="0" cellpadding="0">
  <thead>
  <tr>
    <th>开发人员姓名</th>
    <th>S类Issue个数</th>
    <th>A类Issue个数</th>
    <th>需求个数</th>
  </tr>
  </thead>
  <tbody>
<% for user in @users %>
  <tr class="<%= cycle("even","odd") %>">
    <td><%= user.name %></td>
    <td><%= link_to user.assigned_issues.count_open_issues("S"),
                                              :controller => :issues,
                                              :action => :index,
                                              :user_id => user,
                                              :issue_type => "S" %></td>
    <td><%= link_to user.assigned_issues.count_open_issues("A"),
                                              :controller => :issues,
                                              :action => :index,
                                              :user_id => user,
                                              :issue_type => "A" %></td>
    <td><%= link_to user.requirements.count_unfinished_requirements,
                                          :controller => :requirements,
                                          :action => :index,
                                          :user_id => user %></td>
  </tr>
<% end %>
  </tbody>
</table>